home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 050a / _tsgrep.zip / TSGREP.BAT next >
DOS Batch File  |  1993-05-04  |  2KB  |  51 lines

  1. @echo off
  2. rem Usage:
  3. rem            TSGREP string infile [options [outfile]]
  4. if "%1"== ""  goto :no2
  5. if "%1"== "?" goto :help
  6. if "%2"== ""  goto :help
  7. set STRING=%1
  8. set infile=%2
  9. set options=%3
  10. set outfile=%4
  11. set exclude=" .bak .$hp"
  12. :no2
  13.  
  14. e tsgrep.tmp -eTSGREP
  15.  
  16. rem cls
  17. goto end
  18.  
  19. :help
  20. echo ┌──────────────────────────────────────────────────────────────────────┐
  21. echo │ Usage:                                                               │
  22. echo │            TSGREP  [searchstring infile [options [outfile]]]         │
  23. echo ╞══════════════════════════════════════════════════════════════════════╡
  24. echo │ If no arguments given, TSGREP prompts for each one.                  │
  25. echo │ Searchstring may be any QEdit searchstring.                          │
  26. echo │      * Use -OR- instead of as the 'OR' indicator in expressions      │
  27. echo │      * Use -OR- instead of as the 'OR' indicator in expressions      │
  28. echo │      * Braces optional; default parsing supplied                     │
  29. echo │      * Use \- instead of =                                           │
  30. echo │      * Use _ instead of space                                        │
  31. echo │ Infile may be any valid filespec, wildcards included.                │
  32. echo │      Files with '@' in the name are treated as list files.           │
  33. echo │      Add + to the end of the filesspec for recursivce search.        │
  34. echo │      List files may be nested to 3 levels; possibly more will work.  │
  35. echo │      Use ^ as a separator for multiple filespecs.                    │
  36. echo │ Options may be any QEdit search options except 'b'.                  │
  37. echo │      * An additional TSGREP option is 'e', 'edit the outfile'.       │
  38. echo │      * Default options = 'ei''                                       │
  39. echo │      * if only 'e' entered, options set to 'ei'                      │
  40. echo │      * Use \# in options for suppress line numbers                   │
  41. echo │      * Use 1 in options to stop searching each file after 1 hit      │
  42. echo │ Outfile is optional; default is TSGREP.TMP                           │
  43. echo └──────────────────────────────────────────────────────────────────────┘
  44. :end
  45. set string=
  46. set infile=
  47. set outfile=
  48. set options=
  49. set exclude=
  50.  
  51.